#ifndef SHAPEITEM_H
#define SHAPEITEM_H

#include <QObject>
#include <QGraphicsItem>
#include <QPainter>
#include <QGraphicsSceneMouseEvent>
#include <QDebug>
#include <QCursor>
#include <QMouseEvent>
#include <QPainterPath>
#include <QGraphicsPathItem>
#include <QPointF>

class shapeItem : public QObject, public QGraphicsItem
{
    Q_OBJECT
public:
    explicit shapeItem(QObject *parent = 0);
    ~shapeItem();
    QString typeItem;
    double a, b;
    int coord_x;
    int coord_y;
    int index;
    qreal angel;

private:
    QPen pen;
    QRectF boundingRect() const;
    QPainterPath shape() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*);
    void mouseMoveEvent(QGraphicsSceneMouseEvent * event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
    void mousePressEvent(QGraphicsSceneMouseEvent * event);
   // void keyPressEvent(QKeyEvent *event);
};
#endif // SHAPEITEM_H
